package org.gege.crawler

class ListItem extends Serializable {
  
  var topicId : Long = 0
  var imgUrl : String = ""
  var link : String = ""
  var title : String = ""
  
  var userLink : String = ""
  var userName : String = ""
  var userLogoImgUrl : String = ""
  
  var read : Long = 0
  var replys : Long = 0
  
  def txtInfo = {
    s"link : $link, topic[$topicId], title : $title, userName : $userName, read : $read, replys : $replys"
  }
  
  def toNewsItem = {
    var n = new NewsItem
    
    n.setTopicId(topicId)
    n.setImgUrl(imgUrl)
    n.setLink(link)
    n.setTitle(title)
    
    n.setUserLink(userLink)
    n.setUserName(userName)
    n.setUserLogoImgUrl(userLogoImgUrl)
    
    n.setReadCount(read)
    n.setReplays(replys)
    
    n
  }
}

object ListItem {
  def main(args: Array[String]): Unit = {
    println(1)
  }
}